<?php
namespace app\admin\model;
use think\Model;
use think\Db;

class CommunityModel extends Model
{

    public function selectAll(){
        $res = Db::table('community')->where('is_del', 0)->select();
        return $res;
    }

    public function insertRow($data){
        $row = Db::table('community')->insert($data);
        return $row;
    }
    public function updateRow($data){
        $row = Db::table('community')->update($data);
        return $row;
    }

    public function selectFind($id)
    {
        $res = Db::table('community')->where(array('id'=>$id))->find();
        return $res;
    }

    public function updateAll($data){
        $res = Db::table('community')->update($data);
        return $res;
    }

}